<%@ include file="../common.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
				$("#unittype").attr("action",'<c:url value="/saveBusinessUnitTypeDetails.htm"></c:url>');
				$("#unitName").focus();
			});
		
</script>

<form:form commandName="businessUnitTypeDTO" id="unittype">
	<table class="adminFilterTable">
		<tr class="tableChildHeaderColor">
			<td colspan="5" align="center"> ADD NEW BUISNESS UNIT TYPE </td>
		</tr>
		<tr class="formSpacingRow"><td></td> </tr>
		<tr> 
			<td align="left" colspan="5" style="font-family: verdana; font-size: 12px;"> All fields are mandatory.</td> 
		</tr>
		<tr class="formSpacingRow"><td></td> </tr>
		<tr>
			<td class="spacingColumnWidthLess"></td>
			<td class="formLabel"> Name </td>	
			<td class="spacingColumnWidthLess"></td>
			<td class="formField"> <form:input path="buTypeName" id="unitName"></form:input> 
				 <form:errors cssClass="errorMessage formLabel" path="buTypeName"></form:errors>
			</td>
			<td class="spacingColumnWidthLess"></td>
		</tr>
		<tr>
			<td class="spacingColumnWidthLess"></td>
			<td class="formLabel"> Code </td>	
			<td class="spacingColumnWidthLess"></td>
			<td class="formField"> <form:input path="buTypeCode"/> 
				<form:errors cssClass="errorMessage formLabel" path="buTypeCode"></form:errors>
			</td>
			<td class="spacingColumnWidthLess"></td>
		</tr>
		<tr>
			<td class="spacingColumnWidthLess"></td>
			<td></td>
			<td class="spacingColumnWidthLess"></td>
			<td colspan="2"> <input class="formButton ui-corner-all" type="button" value="Save" onclick="javascript:addEntity('unittype')"> </td>
		</tr>
		<tr class="formSpacingRow"><td></td> </tr>
	</table>
</form:form>
<c:if test="${errorCount eq 0}">
	<c:choose>
		<c:when test="${resultOfSave}">
			Operation Done Successfully
		</c:when>
		<c:otherwise>
			<label class="errorMsg"> <form:errors /> </label>
		</c:otherwise>
	</c:choose>
</c:if>